package adapter.class_adapter;

public class Client {
    public static void main(String[] args) {
        Computer computer = new Computer();

        // 电脑只能  读取/写入  sd卡的数据
        ISdCard sdCard = new SdCardImpl();
        String s = computer.readSd(sdCard);
        System.out.println(s);

        System.out.println("===================");
        // 使用计算机读取 TF 卡中的数据
        // SdAdapter 实现 ISdCard 接口，也就是说 SdAdapter 是  ISdCard 的子类！
        ISdCard sdAdapter = new SdAdapter();
        String msg = computer.readSd(sdAdapter);
        System.out.println("msg=="+msg);
    }
}
